import time

def time_time(t):
    t = time.strptime(t,'%Y-%m-%d %H:%M:%S')
    # time.struct_time(tm_year=2018, tm_mon=8, tm_mday=22, tm_hour=13, tm_min=14, tm_sec=20, tm_wday=2, tm_yday=234, tm_isdst=-1)
    # 2. 调用mktime函数将时间转成时间戳
    t = time.mktime(t)
    return t
